// 
import './style.css'
const modules = import.meta.glob('./*/*.vue', { eager: true })
const install = async (vue) => {
  for (const path in modules) {
    let name = path.slice(path.lastIndexOf('/') + 1).replace('.vue', '')
    name = name.slice(0, 1).toUpperCase() + name.slice(1)
    vue.component(`Pt${name}`, modules[path].default);
  }
}
// 环境检测，如果是html页面通过script标签使用vue时，直接运行
if(typeof window !== 'undefined'){
  if(window.Vue) {
    install(window.Vue)
  } else {
    window.peentoUi = install
  }
}
export { default as Button } from './button/index'
export { default as Divider } from './divider/index'
export default {
  install
}
